import 'dart:core';

void main() {
  //for
  var num = 5;
  var factorial = 1;
  for (var i = num; i >= 1; i--) {
    factorial *= i;
  }
  print(factorial);

  //for..in
  var obj = [12, 13, 14];
  for (var prop in obj) {
    print(prop);
  }

  List a = [1, 2, 3];
  a.forEach((x) => print(x));

  outer:
  for (int i = 1; i <= 9; i++) {
    for (int j = 0; j <= 9; j++) {
      inner://内层
      for (int k = 0; k <= 9; k++) {
        if (i * i * i + j * j * j + k * k * k == 100 * i + 10 * j + k) {
          print(100 * i + 10 * j + k);
          break outer;
        }
      }
    }
  }
}
